package com.xiaowan.user;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @Author: 若小欢
 * @Date: 2023/3/26 21:01
 * @Description: TODO
 **/
@SpringBootApplication //springboot启动类
@EnableDiscoveryClient //开启注册中心
@EnableFeignClients  //开启远程调用
@MapperScan("com.xiaowan.user.mapper") //扫描mapper包
public class UserApplication {

    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class,args);
        System.out.println("启动成功1");
        System.out.println("111");
        System.out.println("222");

    }


    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
